<?php
class Hitcounter extends AppModel {
	var $name = 'Hitcounter';
	var $primaryKey = 'session_id';
	var $useTable = 'ppl_online';
	var $recursive = -1;
	
	function get($session) {
		$row = $this->find("first", array("conditions" => array("session_id" => $session)));
		if (empty($row)) {
			return 0;
		} else {
			return 1;
		}
	}
}